# -*- coding: utf-8 -*-
# author: sixmillions
# date: 2022/4/3

'''
传统方式序列化反序列化，用pickle
'''
import pickle

import numpy as np

arr_1 = np.arange(10)
print(arr_1)
f = open('arr.pkl', 'wb')  # w写 b二进制
# 写入文件
pickle.dump(arr_1, f)
f.close()

# 读取文件
f = open('arr.pkl', 'rb')
arr_2 = pickle.load(f)
f.close()
print(arr_2)
